<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>  
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'ShopList.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
    <link href="css/bootstrap.min.css" rel="stylesheet" />
    <link href="css/font-awesome.css" rel="stylesheet" />
    <link href="css/AdminLTE.css" rel="stylesheet" />
  </head>
  
  <body>
    <form method="post" action="getUsersList">
    <p align="center">用户排序：
    <select name="orderByDateOrOrder">
    <option value="1" selected>时间降序</option>
    <option value="2">时间升序</option>
    <option value="3">交易次数降序</option>
    <option value="4">交易次数升序</option>
    </select>
    <input type="submit" value="查询用户列表"/></p>
    </form>
    <aside class="right-side">                
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>
                        Data Tables
                        <small>advanced tables</small>
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                        <li><a href="#">Tables</a></li>
                        <li class="active">用户列表</li>
                    </ol>
                </section>

                <!-- Main content -->
                <section class="content">
                    <div class="row">
                        <div class="col-xs-12">
                            
                            <div class="box">
                                <div class="box-header">
                                    <h3 class="box-title">用户列表</h3>                                    
                                </div><!-- /.box-header -->
                                <div class="box-body table-responsive">
                                    <table id="example1" class="table table-bordered table-striped">
                                        <thead>
                                            <tr>
                                                <th>用户ID</th>
                                                <th>用户名</th>
                                                <th>注册时间</th>
                                                <th>电话号码</th>
                                                <th>微信标识</th>
                                                <th>用户积分</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                        <c:forEach items="${entryList}" var="entry">  
                                            <tr>
                                                <td>${entry.id}</td>
                                                <td>${entry.username}</td>
                                                <td>${entry.regTime}</td>
                                                <td>${entry.mobilePhone}</td>
                                                <td>${entry.wxid}</td>
                                                <td>${entry.credit}</td>
                                            </tr>
                                       </c:forEach>  
                                        <tfoot>  
                                         <tr align="center">  
                                         <td colspan="6"><jsp:include page="paging_user_footer.jsp"></jsp:include>  
                                         </td>  
                                         </tr>  
                                         </tfoot>  
                                    </table>
                                </div><!-- /.box-body -->
                            </div><!-- /.box -->
                        </div>
                    </div>

                </section><!-- /.content -->
            </aside><!-- /.right-side -->
            <!-- jQuery 2.0.2 -->
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
        <!-- Bootstrap -->
        <!-- DATA TABES SCRIPT -->
    <script src="js/bootstrap.min.js"></script>
    <script src="js/plugins/datatables/dataTables.bootstrap.js"></script>
    <script src="js/plugins/datatables/jquery.dataTables.js"></script>
    <script src="js/AdminLTE/app.js"></script>

</body>
</html>
